/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.ucb.game8numbers.service.operator;

import br.com.ucb.game8numbers.bean.Point;

/**
 *
 * @author JessicaLuanne
 */
public class LeftOperator extends  Operator{

    @Override
    public Operator getOppositeOperation() {
        return (Operator) new RightOperator();
    }

   @Override
    public Point getDestination() {
        return new Point(getSource().getLine(), getSource().getColumn()-1);
    }

    @Override
    public boolean canOperate() {
        Point destination = getDestination();
        return destination.getColumn() >= 0;
    }}
